package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Goods;
import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Mr.Abel
 * @since 2024-12-31
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    // 添加商品
    @Insert("INSERT INTO goods (name) VALUES (#{goods.name})")
    int addGoods(Goods goods);
}
